<script setup>
  import { reactive, ref, onMounted } from 'vue';
  import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
  // import zhCn from 'element-plus/dist/locale/en.mjs';
  import { ElConfigProvider } from 'element-plus';
  const locale = ref(zhCn);
  const config = reactive({
    max: 1
  });
  // onMounted(() => {
  //   // 关闭浏览器窗口的时候清空浏览器缓存在localStorage的数据
  //   window.onbeforeunload = function (e) {
  //     var storage = window.localStorage;
  //     storage.clear();
  //   };
  // });
</script>

<template>
  <!-- namespace="el"  修改组件css样式前缀 -->
  <el-config-provider size="large" :locale="locale" :message="config">
    <router-view></router-view>
  </el-config-provider>
</template>

<style scoped>
  * {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .main {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
  }
</style>
